﻿using Eneta.Portal.Forum.Core.Domain.Entities;
using Eneta.Portal.Forum.Core.Service.Application;

namespace Eneta.Portal.Forum.Utility
{
    public class HtmlUtility
    {
        public static string CreateProfileLink(ForumUser user)
        {
            var str2 = ForumApplication.Instance.GetLink(SharePointForumControls.ViewProfile, "userid={0}", new object[] { user.UserId });
            return string.Format("<a href=\"{0}\">{1}</a>", str2, user.Name);
        }

        public static string CreateProfileLinkFromId(int id)
        {
            return CreateProfileLink(RepositoryRegistry.ForumUserRepository.GetBySharePointId(id));
        }
    }
}
